package com.eyas.im.gui.swing.login.dao;

/**
 * 账号信息表
 */
public class IMUserInfo {
    private int userId;
    private String userAccount;
    private String userPassword;
    private char validFlag;//有效标志（1：有效，0：无效）

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public char getValidFlag() {
        return validFlag;
    }

    public void setValidFlag(char validFlag) {
        this.validFlag = validFlag;
    }

    @Override
    public String toString() {
        return String.format("%s(%d)",this.userAccount,this.userId);
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof IMUserInfo && ((IMUserInfo) obj).userId == this.userId;
    }
}
